pp108 : Examples of Replace With

Examples of Replace With

This topic provides examples for the operation type - .

Replace With with Select

Target Element before Message Mapping

Source Element

Target Element after Message Mapping

The Target element is/UpdateInput/Update/tuple/oldand the XML structure of the Target element before mapping the message is as follows:

<UpdateInput>
    <Update>
        <tuple>
            <old>
                <Orders>
                    <OrderID>100</OrderID>
                </Orders>
            </old>
        </tuple>
    </Update>
</UpdateInput>

The Source element is new and the XML structure of the Source element is as follows:

<new>
    <Orders>
        <OrderID>250</OrderID>
    </Orders>
</new>
<UpdateInput>
    <Update>
        <tuple>
            <new>
                <Orders>
                    <OrderID>250</OrderID>
                </Orders>
            </new>
        </tuple>
    </Update>
</UpdateInput>

Replace With with Fixed Value

Target Element before Message Mapping

Source Element

Target Element after Message Mapping

The Target element is/Orders/OrderIDand the XML structure of the Target element before mapping the message is as follows:

<Orders>
    <OrderID/>
</Orders>

The Source element is250and the XML structure of the Source element is250.

<Orders>250<Orders>

Replace With with Expression

Target Element before Message Mapping

Source Element

Target Element after Message Mapping

The Target element is/Employee/AnnualSalaryand the XML structure of the Target element before mapping the message is as follows:

<Employees>
    <AnnualSalary/>
</Employees>

The Source element isEmployee/MonthlySalary * 12and the XML structure of the Source element is1000 * 12 = 12000.

<Employees>12000
<Employees>

Replace With with XML Structure

Target Element before Message Mapping

Source Element

Target Element after Message Mapping

The Target element is/UpdateInput/Update/tuple/oldand the XML structure of the Target element before mapping the message is as follows:

<UpdateInput>
    <Update>
        <tuple>
            <old>
                <Orders>
                    <OrderID>100</OrderID>
                </Orders>
            </old>
        </tuple>
    </Update>
</UpdateInput>

The Source element is<new><Orders><OrderID/></Orders></new>and the XML structure of the Source element is as follows:

<new>
    <Orders>
        <OrderID/>
    </Orders>
</new>
<UpdateInput>
    <Update>
        <tuple>
            <new>
                <Orders>
                    <OrderID/>
                </Orders>
            </new>
        </tuple>
    </Update>
</UpdateInput>

Related concepts

Pre Assignments
Post Assignments

Related tasks

Creating Assignments

Related reference

Operation Types
Examples of Add
Examples of Add XML as String
Examples of Delete
Examples of Replace Content With
Examples of Replace XML as String